<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<p>Hello, <span th:text="${
    T(org.springframework.security.core.context.SecurityContextHolder)
      .context.authentication.principal.username}"></span>!</p>
<form action="/logout" method="post">
    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
    <input type="submit" value="Log Out">
</form>
</html>